Skip to content

Complete TODO implementations in Problem Solving Patterns notebook#1

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/satisfactory-zebra
Draft

Complete TODO implementations in Problem Solving Patterns notebook#1
Copilot wants to merge 4 commits into
mainfrom
copilot/satisfactory-zebra

Conversation

Copilot AI commented Dec 19, 2025

Copy link
Copy Markdown

Two TODO placeholders in 0_Problem_Solving_Patterns.ipynb needed implementation.

Changes

  • Pangram solution: Removed TODO comment from already-correct implementation
  • Reverse Vowels solution: Replaced broken implementation with two-pointer approach
    • Original code attempted in-place string mutation (Python strings are immutable)
    • New implementation converts to list, swaps vowels from both ends, handles case-sensitivity
def reverseVowels(self, s: str) -> str:
    vowels = set("aeiouAEIOU")
    s_list = list(s)
    left, right = 0, len(s) - 1
    
    while left < right:
        while left < right and s_list[left] not in vowels:
            left += 1
        while left < right and s_list[right] not in vowels:
            right -= 1
        if left < right:
            s_list[left], s_list[right] = s_list[right], s_list[left]
            left += 1
            right -= 1
    
    return ''.join(s_list)
  • Fixed typo: psuedocodepseudocode
Original prompt

Work on TODO: Write your code here (from /Users/maver/Desktop/Coding Projects/Python/Datastructures-Algos-in-Python-/Datastructures + Algorithms/0_Problem_Solving_Patterns.ipynb)

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 19, 2025 18:59
Co-authored-by: emaverick2001 <115189017+emaverick2001@users.noreply.github.com>
Co-authored-by: emaverick2001 <115189017+emaverick2001@users.noreply.github.com>
Copilot AI changed the title [WIP] Add implementation for TODO section in notebook Complete TODO implementations in Problem Solving Patterns notebook Dec 19, 2025
Copilot AI requested a review from emaverick2001 December 19, 2025 19:01
…and methods

- Introduced a complete HashTable class with O(1) average operations for put, get, remove, and more.
- Included various dictionary operations such as get, pop, update, clear, and copy.
- Demonstrated handling of corner cases, including empty dictionaries, single key-value pairs, and large dictionaries.
- Provided examples for special cases like duplicate keys, string vs integer keys, and unhashable values.
- Added nested dictionary access and iteration order guarantees in Python 3.7+.
- Included practical use cases for counting occurrences and modifying dictionaries as function arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants